using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class StandMap : EntityTypeConfiguration<Stand>
    {
        public StandMap()
        {
            // Primary Key
            this.HasKey(t => t.IDS_ID);

            // Properties
            this.Property(t => t.patient_id)
                .HasMaxLength(20);

            this.Property(t => t.create_by)
                .HasMaxLength(20);

            this.Property(t => t.IDS_Stenting_indications)
                .HasMaxLength(50);

            this.Property(t => t.IDS_Name)
                .HasMaxLength(50);

            this.Property(t => t.IDS_Diameter)
                .HasMaxLength(20);

            this.Property(t => t.IDS_Length)
                .HasMaxLength(20);

            this.Property(t => t.IDS_Max_Expansion_pressure)
                .HasMaxLength(20);

            this.Property(t => t.IDS_Max_Expansion_time)
                .HasMaxLength(20);

            this.Property(t => t.IDS_Max_Expansion_Num)
                .HasMaxLength(20);

            this.Property(t => t.IDS_Factory)
                .HasMaxLength(50);

            this.Property(t => t.IDS_CoatingDegradation)
                .HasMaxLength(50);

            this.Property(t => t.IDS_FullyBiodegradable)
                .HasMaxLength(50);

            this.Property(t => t.IDS_Carrier)
                .HasMaxLength(50);

            this.Property(t => t.IDS_Rapamycin)
                .HasMaxLength(50);

            this.Property(t => t.IDS_Taxol)
                .HasMaxLength(50);

            this.Property(t => t.IDS_ArsenicTrioxide)
                .HasMaxLength(50);

            this.Property(t => t.IDS_BareMetalStents)
                .HasMaxLength(50);

            this.Property(t => t.IDS_DrugElutingStents)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("Stand");
            this.Property(t => t.IDS_ID).HasColumnName("IDS_ID");
            this.Property(t => t.TTL_ID).HasColumnName("TTL_ID");
            this.Property(t => t.patient_id).HasColumnName("patient_id");
            this.Property(t => t.follow_up_id).HasColumnName("follow_up_id");
            this.Property(t => t.create_time).HasColumnName("create_time");
            this.Property(t => t.create_by).HasColumnName("create_by");
            this.Property(t => t.IDS_Stenting_indications).HasColumnName("IDS_Stenting_indications");
            this.Property(t => t.IDS_Name).HasColumnName("IDS_Name");
            this.Property(t => t.IDS_Diameter).HasColumnName("IDS_Diameter");
            this.Property(t => t.IDS_Length).HasColumnName("IDS_Length");
            this.Property(t => t.IDS_Max_Expansion_pressure).HasColumnName("IDS_Max_Expansion_pressure");
            this.Property(t => t.IDS_Max_Expansion_time).HasColumnName("IDS_Max_Expansion_time");
            this.Property(t => t.IDS_Max_Expansion_Num).HasColumnName("IDS_Max_Expansion_Num");
            this.Property(t => t.IDS_Factory).HasColumnName("IDS_Factory");
            this.Property(t => t.IDS_CoatingDegradation).HasColumnName("IDS_CoatingDegradation");
            this.Property(t => t.IDS_FullyBiodegradable).HasColumnName("IDS_FullyBiodegradable");
            this.Property(t => t.IDS_Carrier).HasColumnName("IDS_Carrier");
            this.Property(t => t.IDS_Rapamycin).HasColumnName("IDS_Rapamycin");
            this.Property(t => t.IDS_Taxol).HasColumnName("IDS_Taxol");
            this.Property(t => t.IDS_ArsenicTrioxide).HasColumnName("IDS_ArsenicTrioxide");
            this.Property(t => t.IDS_BareMetalStents).HasColumnName("IDS_BareMetalStents");
            this.Property(t => t.IDS_DrugElutingStents).HasColumnName("IDS_DrugElutingStents");
        }
    }
}
